package org.joyliu.dwr;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Administrator
 *
 */
public class DictUtil {
	/**
	 * 获取字符串
	 */
	public String getRemoteText(String param){
		System.out.println("======获取字符串======="+param);
		return "call method getRemoteText";
	}
	/**
	 * 获取对象
	 */
	public List<Dictionary> qryDictByType(String type){
		List<Dictionary> dicts = new ArrayList<Dictionary>();
		Dictionary obj1,obj2;
		if("2".equals(type.toLowerCase())){
			obj1 = new Dictionary();
			obj1.setCode("591");
			obj1.setValue("福州");
			obj2 = new Dictionary();
			obj2.setCode("592");
			obj2.setValue("厦门");
			dicts.add(obj1);
			dicts.add(obj2);
		}else if("1".equals(type.toLowerCase())){
			obj1 = new Dictionary();
			obj1.setCode("1001");
			obj1.setValue("汉族");
			obj2 = new Dictionary();
			obj2.setCode("1002");
			obj2.setValue("藏族");
			dicts.add(obj1);
			dicts.add(obj2);
		}
		return dicts;
	}
}
